/*
 * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef BASE_THING_MODEL_H
#define BASE_THING_MODEL_H

#include <tuple>
#include "sle_thing_model_define.h"

namespace OHOS {
namespace iotConnect {
class AbstractDevice {
public:
    virtual int32_t DevInfoGetCharState(const IotcCharState inData, char **data, uint32_t *len) const = 0;
    virtual int32_t ConfigurationManagementGetCharState(const IotcCharState inData, char **data, uint32_t *len) = 0;
    virtual int32_t ConfigurationManagementPutCharState(const IotcCharState inData, const char *data, uint32_t len) = 0;
    
    virtual int32_t InternalHandler(const IotcCharState inData, char **out, uint32_t *len,
        ThingModelPutOrGet flag = ThingModelPutOrGet::GET){return 0;};
    virtual int32_t GetAllInfoHandler(const std::string& devId, IotcCharState *state) = 0;
    
    // virtual int32_t SleInfoGetCharState(const char *devId, const IotcServiceInfo *svc, char *inData,  uint32_t len, char **outData, uint32_t *len) = 0;
    // virtual int32_t WifiInfoGetCharState(const char *devId, const IotcServiceInfo *svc, char *inData,  uint32_t len, char **outData, uint32_t *len) = 0;
    // virtual int32_t ConfigurationManagementGetCharState(const char *devId, const IotcServiceInfo *svc, char *inData,  uint32_t len, char **outData, uint32_t *len) = 0;
    // virtual int32_t ConfigurationManagementPutCharState(const char *devId, const IotcServiceInfo *svc, const char *data, uint32_t len) = 0;
    // virtual int32_t CPUInfoGetCharState(const char *devId, const IotcServiceInfo *svc, char *inData,  uint32_t len, char **outData, uint32_t *len) = 0;
    // virtual int32_t OSInfoGetCharState(const char *devId, const IotcServiceInfo *svc, char *inData,  uint32_t len, char **outData, uint32_t *len) = 0;
    // virtual int32_t OTAInfoGetCharState(const char *devId, const IotcServiceInfo *svc, char *inData,  uint32_t len, char **outData, uint32_t *len) = 0;
    // virtual int32_t OTAInfoPutCharState(const char *devId, const IotcServiceInfo *svc, const char *data, uint32_t len) = 0;
    // virtual int32_t RestartInfoGetCharState(const char *devId, const IotcServiceInfo *svc, char *inData,  uint32_t len, char **outData, uint32_t *len) = 0;
    // virtual int32_t RestartInfoPutCharState(const char *devId, const IotcServiceInfo *svc, const char *data, uint32_t len) = 0;

    // virtual int32_t FactoryResetGetCharState(const char *devId, const IotcServiceInfo *svc, char *inData,  uint32_t len, char **outData, uint32_t *len) = 0;
    // virtual int32_t FactoryResetPutCharState(const char *devId, const IotcServiceInfo *svc, const char *data, uint32_t len) = 0;
    // virtual int32_t ServiceListGetCharState(const char *devId, const IotcServiceInfo *svc, char *inData,  uint32_t len, char **outData, uint32_t *len) = 0;
    // virtual int32_t ServiceListPutCharState(const char *devId, const IotcServiceInfo *svc, const char *data, uint32_t len) = 0;

    virtual ~AbstractDevice(){};
    // int32_t PutCharState(const   IotcCharState state[], uint32_t num);
    // int32_t GetCharState(const IotcCharState state[], char *out[], uint32_t len[], uint32_t num);
    // int32_t ReportAll();
    // int32_t ReportCharState(const char *sid);
    // int32_t GetPincode(uint8_t *buf, uint32_t bufLen);
    // int32_t GetAcKey(uint8_t *buf, uint32_t bufLen);
    // int32_t NoticeReboot(IotcRebootReason res);

    

public:
    int32_t SVC_NUMBER = 0;
};
}
}
#endif
